package com.msmall.community.common.model;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;

import com.msmall.base.model.BaseObject;
import com.msmall.base.util.Constants;
import com.msmall.community.common.util.SightUtil;

/**
 *旅游的地点 
 */
@Entity
@Table(name="base_sight")
public class Sight extends BaseObject {

	private static final long serialVersionUID = -7420802420163939319L;

	@Id
	@Column(name="sight_id")
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Long sightid;
	
	/**
	 *景区名称
	 */
	@Column(name="name")
	private String name;
	
	/**
	 * 描述
	 */
	@Lob
	@Basic(fetch=FetchType.LAZY)
	@Column(name="description")
	private String description;
	
	/**
	 * 首页声明图片路径
	 */
	@Column(name="image_path")
	private String imagePath;
	
	/**
	 * 首页声明图片名称
	 */
	@Column(name="image_name")
	private String imageName;
	
	/**
	 * 类型：1山 2水，ConstantDB.SITE_TYPES_
	 */
	@Column(name="types")
	private Integer types;
	
	/**
	 * 此旅游地对应的论坛ID
	 */
	@Column(name="boardId")
	private Long boardId;
	
	/**
	 * 所在地
	 */
	@Column(name="city_code")
	private String cityCode;
	
	public Long getSightid() {
		return sightid;
	}

	public void setSightid(Long sightid) {
		this.sightid = sightid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getImagePath() {
		return imagePath;
	}

	public void setImagePath(String imagePath) {
		this.imagePath = imagePath;
	}

	public String getImageName() {
		return imageName;
	}

	public void setImageName(String imageName) {
		this.imageName = imageName;
	}

	public Integer getTypes() {
		return types;
	}

	public void setTypes(Integer types) {
		this.types = types;
	}

	public Long getBoardId() {
		return boardId;
	}

	public void setBoardId(Long boardId) {
		this.boardId = boardId;
	}

	public String getCityCode() {
		return cityCode;
	}

	public void setCityCode(String cityCode) {
		this.cityCode = cityCode;
	}

	public String getHtmlImage(){
		return SightUtil.getHomePath(sightid, Constants.USER_AGENT_TYPE_HTML) + imageName;
	}
	
	public String getWmlImage(){
		return SightUtil.getHomePath(sightid, Constants.USER_AGENT_TYPE_WML) + imageName;
	}
	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return null;
	}

}
